package com.leyou.auth.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 虎哥
 */
@FeignClient("auth-service")
public interface AuthClient {
    /**
     * 验证客户端信息，并返回jwt秘钥
     *
     * @param clientId 客户端id
     * @param secret   客户端秘钥
     * @return jwt秘钥
     */
    @GetMapping("/client/key")
    String getJwtKey(
            @RequestParam("clientId") String clientId, @RequestParam("secret") String secret);
}
